﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Charisma.MongoDB.Tests.SerializationModel
{
    public class Context : DbContext
    {
        public Repository<Person> Persons { get; set; }

        public Charisma.DbModel DbModel { get { return base.DbModel; } }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Person>()
                .Map(p => p.FirstName).HasName("Name")
                .Ignore(p => p.LastName);
        }

        public Context() : base ("Test")
        {
        }
    }
}
